home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / Misc / DLL / MkStubsOs < prev    next >
Text File  |  1995-09-04  |  4KB  |  145 lines

  1.  
  2. ObjectFiles    =        \
  3.             o.Screen    \
  4.             o.SWI    \
  5.             o.Validation    \
  6.             o.Dispatch    \
  7.  
  8.  
  9. LibName        =    Misc
  10.  
  11.  
  12.  
  13. # Template makefile to make all .o files
  14. # and the SDLS Stubs file for DeskLib
  15. # sublibraries.
  16. # Julian Smith 16 Mar 1995.
  17.  
  18.  
  19. # The macro $(ObjectFiles) should be set at the 
  20. # start of this file, to be a space-separated
  21. # list of object files.
  22. # This is done by 'Makatic'.
  23.  
  24.  
  25. # The macro $(LibName) should also be set at the 
  26. # start of this file, to be the name of the 
  27. # DeskLib sublibrary.
  28. # This is done by 'Makatic'.
  29.  
  30. # Compiler and linker flags, These can be anything. 
  31. # All flags required by Straylight (eg CC -zM and
  32. # Link -rmf) are included in the macros $(CC) and
  33. # $(LINK).
  34. #
  35. CCFlags        =    -fahi $(CCExtra) -depend !Depend -throwback -D_DeskLib_$(LibName) -I,C:
  36. ASMFlags    =    -Stamp -NoCache -CloseExec -Quit $(ASMExtra)
  37.  
  38.  
  39. # Macros for commands, including the Straylight
  40. # tool 'cdll'. Note that DRLink doesn't seem to
  41. # work with the SDLS.
  42. #
  43. CC        =    cc -c -zM -d_DLL -JC:DLLLib.,:mem $(CCFlags)
  44. ASM        =    ObjAsm $(ASMFlags)
  45. CDLL        =    cdll
  46. LINK        =    link
  47. AS        =    as -dde -throwback
  48.  
  49.  
  50. # filename of DLL Stubs aof file. This is linked with client apps.
  51. DLL_Stubs    =    Stubs
  52.  
  53.  
  54. # Filenames of intermediate files needed to make $(DLL_Lib) and $(DLL_Stubs).
  55. #
  56. # DLL_Def:        Standard definition file as per SDLS docs.
  57. # DLL_OtherStubsSource    Assembler source to be partially linked into
  58. #            the final stubs file. This will force linking
  59. #            in of stubs from any other DLLs used by this
  60. #            library when a client application is built.
  61. # DLL_PlainStubs    The vanilla stubs file created by SDLS's cdll.
  62. # DLL_OtherStubsObject    Assembled from DLL_OtherStubsSource. This
  63. #            simply imports __DeskLib_SDLS_Stubs_<libname>'s
  64. #            for all DeskLib DLLs used by this library, and
  65. #            exports __DeskLib_SDLS_Stubs_<thislibname>.
  66. #
  67. DLL_Def            =    ^.DLLDef
  68. DLL_OtherStubsSource    =    ^.OtherStubs
  69.  
  70. DLL_PlainStubs        =    PlainStubs
  71. DLL_OtherStubsObject    =    OSObj
  72.  
  73. # -------------------------------------------------------
  74. # Everything below here should probably not be changed...
  75. # -------------------------------------------------------
  76.  
  77.  
  78.  
  79. # Now all the rules...
  80.  
  81.  
  82. # Here's the two things we want to make...
  83. #
  84. All:    $(DLL_Stubs) $(ObjectFiles)
  85.  
  86. $(DLL_Stubs):    $(DLL_PlainStubs) $(DLL_OtherStubsObject)
  87.     $(LINK) -aof -o $@ $(DLL_PlainStubs) $(DLL_OtherStubsObject)
  88.  
  89. $(DLL_PlainStubs):    $(DLL_Def)
  90.     $(CDLL) -def $(DLL_Def) -stub $(DLL_PlainStubs)
  91.  
  92.  
  93. #$(DLL_OtherStubsObject):    $(DLL_OtherStubsSource)
  94. #    $(AS) -o $(DLL_OtherStubsObject) $(DLL_OtherStubsSource)
  95.  
  96. $(DLL_OtherStubsObject):    $(DLL_OtherStubsSource)
  97.     $(ASM) $(ASMFlags) -from $(DLL_OtherStubsSource) -to $(DLL_OtherStubsObject) 
  98.  
  99.  
  100. $(DLL_Def):    
  101.     | Warning: No DLL definition file exists.
  102.     | Creating a default DLL definition file: $(DLL_Def)
  103.     | This will have to be altered by hand.
  104.     $(CDLL) -def $(DLL_Def) -obj $(ObjectFiles)
  105.  
  106.  
  107.  
  108. # Rule for compiling C source code for a Straylight dynamically-linked library.
  109.  
  110. VPATH = @.^
  111.  
  112. .SUFFIXES:    .o .c .s
  113.  
  114. .c.o:
  115.     $(CC) -o $@ $<
  116.  
  117. .s.o:
  118.     $(ASM) $(ASMFlags) -from $< -to $@
  119.  
  120.  
  121.  
  122. # Dynamic dependencies:
  123. o.Screen:    ^.c.Screen
  124. o.Screen:    DeskLib:h.Wimp
  125. o.Screen:    DeskLib:h.Core
  126. o.Screen:    C:h.stddef
  127. o.Screen:    C:DLLLib.h.dll
  128. o.Screen:    C:h.kernel
  129. o.Screen:    DeskLib:h.SWI
  130. o.Screen:    DeskLib:h.Screen
  131. o.SWI:    ^.c.SWI
  132. o.SWI:    C:h.stdarg
  133. o.SWI:    C:h.kernel
  134. o.SWI:    DeskLib:h.Core
  135. o.SWI:    C:h.stddef
  136. o.SWI:    C:DLLLib.h.dll
  137. o.SWI:    DeskLib:h.SWI
  138. o.Validation:    ^.c.Validation
  139. o.Validation:    DeskLib:h.Core
  140. o.Validation:    C:h.stddef
  141. o.Validation:    C:DLLLib.h.dll
  142. o.Validation:    C:h.kernel
  143. o.Validation:    DeskLib:h.Validation
  144.